<template>
	<view class="bi-driver-select" @click="handleClick">
		<view class="bi-driver-select__handle">
			<view class="bi-driver-select__label">选择司机</view>
			<view class="bi-driver-select__count">已选<text>3</text>位</view>
		</view>
		<view class="bi-driver-select__selection">
			<scroll-view class="bi-driver-select__selection-scroll" scroll-x>
				<view class="bi-driver-select__selection-list">
					<view class="bi-driver-select__selection-item">
						<bi-driver-select-card></bi-driver-select-card>
					</view>
					<view class="bi-driver-select__selection-item">
						<bi-driver-select-card></bi-driver-select-card>
					</view>
					<view class="bi-driver-select__selection-item">
						<bi-driver-select-card></bi-driver-select-card>
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import BiDriverSelectCard from './driver-select-card.vue'
	
	export default {
		name: 'BiCarSelect',
		components: {
			BiDriverSelectCard
		},
		methods: {
			handleClick () {
				uni.navigateTo({
					url: '/packages/common/driver-select/driver-select'
				})
			}
		}
	}
</script>

<style lang="less">
	.bi-driver-select__handle{
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		position: relative;
		padding-top: 5px;
		padding-bottom: 5px;
		padding-right: 16px;
		&:after {
			content: ''; 
			position: absolute;
			right: 0;
			top: 50%;
			-webkit-transform: translateY(-50%) rotate(45deg);
			transform: translateY(-50%) rotate(45deg);
			width: 8px;
			height: 8px;
			border: 1px solid #ddd;
			border-left: 0;
			border-bottom: 0;
		}
	}
	.bi-driver-select__count {
		text {
			color: #F47554;
			margin: 0 3px;
		}
	}
	.bi-driver-select__selection-scroll{
		width: 100%;
	}
	.bi-driver-select__selection-list{
		display: flex;
		flex-direction: row;
	}
	.bi-driver-select__selection-item{
		margin-top: 6px;
		width: 168px;
		min-width: 168px;
		&:not(:last-child) {
			margin-right: 12px;
		}
	}
</style>